<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel='stylesheet' href='./hylupimg.css' />
		<style>
			.HylUpImg .bt_send {
				background: url(./chat/12.png) no-repeat;
				background-size: cover;
				-webkit-background-size: cover;
				-o-background-size: cover;
			}

			.HylUpImg .bt_camera {
				background: url(./chat/7.png) no-repeat;
				background-size: cover;
				-webkit-background-size: cover;
				-o-background-size: cover;
			}

			.HylUpImg .bt_remove {
				background: url(./chat/13.png) no-repeat;
				background-size: cover;
				-webkit-background-size: cover;
				-o-background-size: cover;
			}


			.HylUpImg .bt_view {
				background: url(./chat/15.png) no-repeat;
				background-size: cover;
				-webkit-background-size: cover;
				-o-background-size: cover;
			}

			.HylUpImg .bt_open {
				background: url(./chat/14.png) no-repeat;
				background-size: cover;
				-webkit-background-size: cover;
				-o-background-size: cover;
			}
		</style>
	</head>
	<body>		<!--HylUpImg 类名 不可改变-->
		<div class="HylUpImg" id="upimg1"></div>
		<br><br><br><br>
	
		<button id="t11">查看上传结果</button>
		<br><br><br><br>
		<div class="HylUpImg" id="upimg2"></div>
		<br><br><br><br>
			
		<button id="t12">查看上传结果</button>
	</body>
</html>
<script type="module">
	import HylUpImg from './hylupimg.js';
	let flist = []
	flist.push('http://localhost:44444/uploaddir/cc/head/xxx/20211026172448.bmp');
	flist.push('http://localhost:44444/uploaddir/cc/head/xxx/20211026172731.png');
	var conf = {
		"上传路径": "http://localhost:44444/upload?c=1234&s=cc&g1=head&g2=xxx&t=2",
	}
	let hupimg = new HylUpImg("upimg1", conf);
	//载入初始化图片
	hupimg.loadImgUrls(flist);
	document.getElementById("t11").onclick = function() {
		console.log(hupimg.toUrls('{"type":"img","content":"$path" }'));
	}
	let hupimg2 = new HylUpImg("upimg2", conf);
	//载入初始化图片
	hupimg2.loadImgUrls(flist);
	document.getElementById("t12").onclick = function() {
		console.log(hupimg2.toUrls('{"type":"img","content":"$path" }'));
	}
</script>
